/*
 * Copyright (c) 2002-2004, xRhino, Inc.
 *
 * This library is free software; you can redistribute and/or modify
 * it under the terms of the dual license distributed with this source
 * package (a combined Trolltech QPL/GPL-compatible license)
 *
 * Under this dual license scheme, a separate license is available for use of 
 * this code with a proprietary (closed) system. For more information on the 
 * license, please see the LICENSE file distributed with this source package.
 */
#include "SugTextElement.h"

char* SugTextElement::getText()
{
   return mText;
}

void SugTextElement::setText(char* newText)
{
   if (newText)
   {
      if (mText)
         delete [] mText;

      mText = new char[strlen(newText) + 1];
      strcpy(mText, newText);
   }
}

SugTextElement::SugTextElement()
{
   mText = NULL;
   setElementType(SugTypes::E_TEXT);
}

SugTextElement::~SugTextElement()
{
   if (mText)
      delete [] mText;
}

